(function() {
	
	new sCanvas("canvas", function() {
		
		var i, j, rectangles;
		
		var rectangles = this.group("rectangles");
		
		for (i = 0; i < 5; i++) {
			for (j = 0; j < 7; j++) {
				this.rect({
					x: j * 50 + 50,
					y: i * 50 + 50,
					width: 30,
					height: 30,
					fill: "#666",
					stroke: "#000",
					group: rectangles
				});
			}
		}
		
		rectangles.each(function(i) {
			this.sc.text(i + 1, {
				x: this.attr("x"),
				y: this.attr("y") + 3,
				align: "center",
				fill: "#ddd"
			});
		});
		
	}, function() {
		alert("Při inicializaci canvasu došlo k chybě.");
	});
	
}());